#pragma once

#define BUILD_FLATBUFFER(type, fb, ...)\
    flatbuffers::FlatBufferBuilder fb;\
    auto fbo = Create##type(fb, __VA_ARGS__);\
    fb.Finish(fbo);

#define GET_FLATBUFFER_OBJ(type, name, address)\
    auto name = Get##type(address);\
    if (!name) {\
        fatallog << "Flatbuffer fatal error, GET OBJECT TYPE:" << #type << endlog;\
        return;\
    }
